/*
 * SonarQube
 * Copyright (C) 2009-2021 SonarSource SA
 * mailto:info AT sonarsource DOT com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
/* TODO this file is HUGE and should be cut into smaller components */

.search-navigator.sticky .search-navigator-workspace-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 300px;
  right: 0;
}

.search-navigator.sticky .search-navigator-workspace-list,
.search-navigator.sticky .search-navigator-workspace-details {
  padding-top: 43px;
}

.search-navigator-facet-box {
  background-color: var(--barBackgroundColor);
  font-size: var(--baseFontSize);
}

.search-navigator-facet-box.leak-facet-box {
  background-color: var(--leakPrimaryColor);
  border: 1px solid var(--leakSecondaryColor);
}

.search-navigator-facet-box.is-inner {
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--barBorderColor);
}

.search-navigator-facet-box.is-inner .search-navigator-facet-header {
  padding-top: 6px;
  padding-bottom: 6px;
}

.leak-facet-box:not(.hidden) + .leak-facet-box {
  border-top: none;
}

.search-navigator-facet-box-forbidden {
  background-color: transparent;
  opacity: 0.5;
}

.search-navigator-facet-box-forbidden .search-navigator-facet-list,
.search-navigator-facet-box-forbidden .search-navigator-facet-empty,
.search-navigator-facet-box-forbidden .search-navigator-facet-container {
  display: none;
}

.search-navigator-facet-box-forbidden .search-navigator-facet-header {
  color: var(--secondFontColor);
}

.search-navigator-facet-box-forbidden .search-navigator-facet-header:hover {
  color: var(--blue);
}

.search-navigator-facet-box-forbidden .search-navigator-facet-header {
  cursor: default;
}

.search-navigator-facet-box-forbidden .search-navigator-facet-header:hover {
  color: var(--secondFontColor);
}

.search-navigator-facet {
  position: relative;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: var(--controlHeight);
  margin: 0 0 1px 0;
  padding: 0 calc(0.75 * var(--gridSize));
  border: 1px solid transparent;
  border-radius: 2px;
  box-sizing: border-box;
  white-space: normal;
  opacity: 0.3;
  cursor: not-allowed;
  transition: none;
}

a.search-navigator-facet {
  opacity: 1;
  cursor: pointer;
}

a.search-navigator-facet .facet-name {
  color: var(--baseFontColor);
}

a.search-navigator-facet:hover,
a.search-navigator-facet:focus,
.search-navigator-facet.active {
  border-color: var(--blue);
}

.search-navigator-facet.facet-category {
  opacity: 1;
  cursor: default;
}

.search-navigator-facet.facet-category .facet-name {
  color: var(--secondFontColor);
}

.search-navigator-facet .facet-name {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 16px;
  padding: 1px 0; /* needed to fit small ratings and levels */
  color: var(--secondFontColor);
  font-size: var(--smallFontSize);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-navigator-facet .facet-stat {
  display: flex;
  align-items: center;
  margin-left: var(--gridSize);
  color: var(--secondFontColor);
  font-size: var(--smallFontSize);
}

.search-navigator-facet .facet-toggle {
  display: none;
  float: left;
  height: 16px;
  line-height: 16px;
  margin-top: -1px;
  padding: 0 5px;
  border-radius: 2px;
  font-size: 11px;
  text-transform: lowercase;
}

.search-navigator-facet .facet-toggle:hover {
  color: var(--baseFontColor);
}

.search-navigator-facet .facet-toggle-active.facet-toggle-green {
  background-color: var(--green);
  color: #ffffff;
}

.search-navigator-facet .facet-toggle-active.facet-toggle-red {
  background-color: var(--red);
  color: #ffffff;
}

.leak-facet-box .search-navigator-facet .facet-name {
  background-color: var(--leakPrimaryColor);
}

.leak-facet-box .search-navigator-facet .facet-stat {
  background-color: var(--leakPrimaryColor);
}

.leak-facet-box .search-navigator-facet .facet-stat:before {
  background-image: linear-gradient(to right, rgba(251, 243, 213, 0), var(--leakPrimaryColor) 75%);
}

.search-navigator-facet.active {
  background-color: var(--lightBlue);
  text-decoration: none;
}

.search-navigator-facet.active .facet-toggle {
  display: inline;
}

.search-navigator-facet.compare .facet-toggle {
  cursor: not-allowed;
  opacity: 0.5;
}

.search-navigator-facet.compare .facet-toggle.facet-toggle-green {
  background-color: var(--green);
  color: #ffffff;
}

.search-navigator-facet.compare .facet-toggle.facet-toggle-red {
  background-color: transparent;
  color: var(--secondFontColor);
}

.search-navigator-facet-half {
  width: 45%;
}

.search-navigator-facet-half:nth-child(odd) {
  margin-right: 10%;
}

.search-navigator-facet-highlight-under-container {
  margin-bottom: 1px;
}

.search-navigator-facet-highlight-under-container .search-navigator-facet {
  margin-bottom: 0;
}

.search-navigator-facet-highlight-under-container .search-navigator-facet:hover,
.search-navigator-facet-highlight-under-container .search-navigator-facet.active {
  border-bottom: none;
  padding-bottom: 1px;
  border-radius: 2px 2px 0 0;
}

.search-navigator-facet-highlight-under-container
  .search-navigator-facet:hover
  ~ .search-navigator-facet,
.search-navigator-facet-highlight-under-container
  .search-navigator-facet.active
  ~ .search-navigator-facet {
  border-top: none;
  border-bottom: none;
  border-left-color: var(--blue);
  border-right-color: var(--blue);
  border-radius: 0;
}

.search-navigator-facet-highlight-under-container
  .search-navigator-facet:hover
  ~ .search-navigator-facet:last-of-type,
.search-navigator-facet-highlight-under-container
  .search-navigator-facet.active
  ~ .search-navigator-facet:last-of-type {
  border-bottom: 1px solid var(--blue);
  border-radius: 0 0 2px 2px;
}

.search-navigator-facet-highlight-under-container .search-navigator-facet:hover:last-of-type,
.search-navigator-facet-highlight-under-container .search-navigator-facet.active:last-of-type {
  border-bottom: 1px solid var(--blue);
  border-radius: 2px;
}

.search-navigator-facet-highlight-under-container
  .search-navigator-facet.active
  ~ .search-navigator-facet {
  background-color: var(--lightBlue);
  text-decoration: none;
}

.search-navigator-facet-highlight-under-container
  .search-navigator-facet.active
  ~ .search-navigator-facet
  .facet-toggle {
  display: inline;
}

.search-navigator-facet-highlight-under-container
  .search-navigator-facet.active
  ~ .search-navigator-facet:hover,
.search-navigator-facet-highlight-under-container
  .search-navigator-facet:hover
  ~ .search-navigator-facet.active {
  border-top: 1px solid var(--blue);
}

.search-navigator-facet-highlight-under-container
  .search-navigator-facet.active
  ~ .search-navigator-facet:hover,
.search-navigator-facet-highlight-under-container
  .search-navigator-facet.active
  ~ .search-navigator-facet:hover
  ~ .search-navigator-facet {
  background-color: #a1cde8;
  text-decoration: none;
}

.search-navigator-facet-highlight-under-container
  .search-navigator-facet.active
  ~ .search-navigator-facet:hover
  .facet-toggle,
.search-navigator-facet-highlight-under-container
  .search-navigator-facet.active
  ~ .search-navigator-facet:hover
  ~ .search-navigator-facet
  .facet-toggle {
  display: inline;
}

.search-navigator-facet-header {
  display: block;
  flex-shrink: 0;
  padding: 8px 0;
  color: var(--baseFontColor);
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
}

.search-navigator-facet-header > a {
  border-bottom: none;
  color: var(--baseFontColor);
}

.search-navigator-facet-header > a:focus,
.search-navigator-facet-header > a:hover {
  color: var(--blue);
}

.search-navigator-facet-header > .note {
  font-weight: 400;
}

.search-navigator-facet-header > h3,
.search-navigator-facet-header > h4 {
  line-height: inherit;
  display: inline;
}

.search-navigator-facet-header-value {
  display: block;
  overflow: hidden;
}

.search-navigator-facet-header-value > .badge {
  display: block;
}

.search-navigator-facet-header-button {
  flex-shrink: 0;
  margin-left: auto;
}

.search-navigator-facet-header-wrapper {
  display: flex;
  align-items: center;
}

.search-navigator-facet-list {
  padding-bottom: var(--gridSize);
  font-size: 0;
}

.search-navigator-facet-list-title {
  margin: 0 var(--gridSize) calc(var(--gridSize) / 2);
  font-size: var(--smallFontSize);
  font-weight: bold;
}

.search-navigator-facet-list + .search-navigator-facet-list > .search-navigator-facet-list-title {
  border-top: 1px solid var(--barBorderColor);
  padding-top: var(--gridSize);
}

.search-navigator-facet-empty {
  margin: 0 0 0 0;
  padding: 0 10px 10px;
  color: var(--baseFontColor);
  font-size: var(--smallFontSize);
  white-space: nowrap;
}

.search-navigator-facet-footer {
  display: block;
  padding-bottom: var(--gridSize);
  border-bottom: none;
}

.search-navigator-facet-container {
  margin-top: 6px;
  padding: 0 10px 16px;
}

.search-navigator-date-facet-selection {
  position: relative;
  padding-left: var(--gridSize);
  font-size: var(--smallFontSize);
}

.search-navigator-date-facet-selection:before,
.search-navigator-date-facet-selection:after {
  display: table;
  content: '';
  line-height: 0;
}

.search-navigator-date-facet-selection:after {
  clear: both;
}

.search-navigator-date-facet-selection .date-input-control-input {
  width: 115px !important;
}

.search-navigator-date-facet-selection-dropdown-left {
  float: left;
  border-bottom: none;
}

.search-navigator-date-facet-selection-dropdown-right {
  float: right;
  border-bottom: none;
}

.search-navigator-date-facet-selection-input-left {
  position: absolute;
  left: 0;
  width: 100px;
  visibility: hidden;
}

.search-navigator-date-facet-selection-input-right {
  position: absolute;
  right: 0;
  width: 100px;
  visibility: hidden;
}

.search-navigator-date-facet-selection
  .date-input-control:not(:nth-of-type(1))
  .date-input-calendar {
  left: auto;
  right: 0;
}

.search-navigator-filters {
  position: relative;
  padding: 5px 10px;
  background-color: var(--barBackgroundColor);
}

.search-navigator-filters:before,
.search-navigator-filters:after {
  display: table;
  content: '';
  line-height: 0;
}

.search-navigator-filters:after {
  clear: both;
}

.search-navigator-filters-header {
  margin-bottom: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--barBorderColor);
}
.search-navigator-intro {
  width: 500px;
  margin: 0 auto;
  padding-top: 100px;
}
